<!DOCTYPE html>
<script>
function test()
{
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.dumpNavigationPolicy();
        window.addEventListener('keydown', function(event) {
            var mouseEvent = new MouseEvent('click', { ctrlKey: true, metaKey: true });
            var link = document.getElementById('link');
            link.dispatchEvent(mouseEvent);
        });
        eventSender.keyDown("a");
    }
}
</script>
<body onload="test()">
<p>Tests that adding a ctrl modifier to a click on a link from the main world triggers a foreground tab.</p>
<a href="blank" id="link">link</a>
</body>
